package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;

import java.util.List;


/**
 * The persistent class for the franjadiaturno database table.
 * 
 */
@Entity
@Table(name="franjadiaturno")
public class FranjaDiaTurno implements Serializable {
	private static final long serialVersionUID = 1L;
	private int franjaDiaTurnoId;
	private FranjaDia franjadia;
	private List<SesionLectiva> sesionlectivas;
	private Turno turno;

    public FranjaDiaTurno() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	public int getFranjaDiaTurnoId() {
		return this.franjaDiaTurnoId;
	}

	public void setFranjaDiaTurnoId(int franjaDiaTurnoId) {
		this.franjaDiaTurnoId = franjaDiaTurnoId;
	}


	//bi-directional many-to-one association to FranjaDia
    @ManyToOne
	@JoinColumn(name="FranjaDiaId", nullable=false)
	public FranjaDia getFranjadia() {
		return this.franjadia;
	}

	public void setFranjadia(FranjaDia franjadia) {
		this.franjadia = franjadia;
	}
	

	//bi-directional many-to-one association to Turno
    @ManyToOne
	@JoinColumn(name="TurnoId", nullable=false)
	public Turno getTurno() {
		return this.turno;
	}

	public void setTurno(Turno turno) {
		this.turno = turno;
	}
	
	//bi-directional many-to-one association to SesionLectiva
	@OneToMany(mappedBy="franjadiaturno")
	public List<SesionLectiva> getSesionlectivas() {
		return this.sesionlectivas;
	}

	public void setSesionlectivas(List<SesionLectiva> sesionlectivas) {
		this.sesionlectivas = sesionlectivas;
	}
}